class TagsController < ApplicationController
	
	skip_before_filter :require_logged_in, only: [:index, :show]
	
	def index
		@tags = Tag.order('name ASC').paginate(page: params[:page])
	end
	
	def show
		@tag = Tag.find(params[:id])
		@documents = @tag.documents.sort_by { |d| d.name }.paginate(page: params[:page])
	end
	
end
